package cn.zhaoyuening.fandamin.domain;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by Buynow on 2017/7/2.
 * <h3>资源与角色关联 多对多</h3>
 */
@Entity
@Table(name = "t_roleResource")
public class RoleResource implements Serializable{
    @Id
    private Long roleId;
    @Id
    private Long resourceId;

    public RoleResource() {
    }

    public RoleResource(Long roleId, Long resourceId) {
        this.roleId = roleId;
        this.resourceId = resourceId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public RoleResource setRoleId(Long roleId) {
        this.roleId = roleId;
        return this;
    }

    public Long getResourceId() {
        return resourceId;
    }

    public RoleResource setResourceId(Long resourceId) {
        this.resourceId = resourceId;
        return this;
    }
}
